package com.dsteiner.widgets.client.model;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

import com.google.gwt.user.client.ui.AbstractImagePrototype;

public class PrintableImageModel {

	private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
			this);

	public void addPropertyChangeListener(PropertyChangeListener listener) {
		propertyChangeSupport.addPropertyChangeListener(listener);
	}
	
	private AbstractImagePrototype image;

	public AbstractImagePrototype getImage() {
		return image;
	}

	public void setImage(AbstractImagePrototype image) {
		AbstractImagePrototype oldImage = this.image;
		this.image = image;
		propertyChangeSupport.firePropertyChange("image", oldImage, image);
	}
	private String url;

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		String oldUrl = this.url;
		this.url = url;
		propertyChangeSupport.firePropertyChange("url", oldUrl, url);
	}
}
